#ifndef __BSP_EEPROM_H
#define __BSP_EEPROM_H

#include "HS52F2003.h"
#include "Common.h"

#define	DLYS1       6
#define	DLYS0       5
#define	ERSALL_EE   3
#define	ERASE_EE    2
#define	PROG_EE     1
#define	READ_EE     0

uint8_t eeprom_read_1byte(uint8_t addr);
void eeprom_write_1byte(uint8_t addr, uint8_t dat);
void Earse_Eeprom_1Byte(uint8_t EE_Addar);
void ReadEeprom_4Byte(uint8_t EE_Addar, uint8_t *dat);



#define	WriteEeprom_1Byte(a, b)     eeprom_write_1byte(a, b)
#define	ReadEeprom_1Byte(a)     eeprom_read_1byte(a)
void ee_read_buf(unsigned char EEPROM_Addr, unsigned char *buf, unsigned char len);


void write_2byte(u8 addr, u16 dat);
u16 read_2byte(u8 addr);

#endif
